package com.xucranger.ojapi.enity.domain;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableField;

import java.io.Serializable;
import lombok.Data;

/**
 * 
 * @TableName atcoder
 */
@TableName(value ="atcoder")
@Data
public class Atcoder implements Serializable {
    /**
     * id
     */
    @TableId
    private Integer tid;

    private String stuid;

    private String stuname;

    /**
     * id
     */
    private String acid;

    /**
     * 比赛名称
     */
    private String accontestname;

    /**
     * 比赛日期
     */
    private String accontestdate;

    /**
     * 积分变化
     */
    private String acchange;

    /**
     * 最高积分
     */
    private String top;

    /**
     * 新积分
     */
    private String acscore;

    /**
     * 排名
     */
    private String acrank;

    /**
     * 表现
     */
    private String performance;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Atcoder other = (Atcoder) that;
        return (this.getTid() == null ? other.getTid() == null : this.getTid().equals(other.getTid()))
            && (this.getStuid() == null ? other.getStuid() == null : this.getStuid().equals(other.getStuid()))
            && (this.getStuname() == null ? other.getStuname() == null : this.getStuname().equals(other.getStuname()))
            && (this.getAcid() == null ? other.getAcid() == null : this.getAcid().equals(other.getAcid()))
            && (this.getAccontestname() == null ? other.getAccontestname() == null : this.getAccontestname().equals(other.getAccontestname()))
            && (this.getAccontestdate() == null ? other.getAccontestdate() == null : this.getAccontestdate().equals(other.getAccontestdate()))
            && (this.getAcchange() == null ? other.getAcchange() == null : this.getAcchange().equals(other.getAcchange()))
            && (this.getTop() == null ? other.getTop() == null : this.getTop().equals(other.getTop()))
            && (this.getAcscore() == null ? other.getAcscore() == null : this.getAcscore().equals(other.getAcscore()))
            && (this.getAcrank() == null ? other.getAcrank() == null : this.getAcrank().equals(other.getAcrank()))
            && (this.getPerformance() == null ? other.getPerformance() == null : this.getPerformance().equals(other.getPerformance()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getTid() == null) ? 0 : getTid().hashCode());
        result = prime * result + ((getStuid() == null) ? 0 : getStuid().hashCode());
        result = prime * result + ((getStuname() == null) ? 0 : getStuname().hashCode());
        result = prime * result + ((getAcid() == null) ? 0 : getAcid().hashCode());
        result = prime * result + ((getAccontestname() == null) ? 0 : getAccontestname().hashCode());
        result = prime * result + ((getAccontestdate() == null) ? 0 : getAccontestdate().hashCode());
        result = prime * result + ((getAcchange() == null) ? 0 : getAcchange().hashCode());
        result = prime * result + ((getTop() == null) ? 0 : getTop().hashCode());
        result = prime * result + ((getAcscore() == null) ? 0 : getAcscore().hashCode());
        result = prime * result + ((getAcrank() == null) ? 0 : getAcrank().hashCode());
        result = prime * result + ((getPerformance() == null) ? 0 : getPerformance().hashCode());

        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", tid=").append(tid);
        sb.append(", stuid=").append(stuid);
        sb.append(", stuname=").append(stuname);
        sb.append(", acid=").append(acid);
        sb.append(", accontestname=").append(accontestname);
        sb.append(", accontestdate=").append(accontestdate);
        sb.append(", acchange=").append(acchange);
        sb.append(", top=").append(top);
        sb.append(", acscore=").append(acscore);
        sb.append(", acrank=").append(acrank);
        sb.append(", performance=").append(performance);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}